<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Edit Page</title>
</head>
<body>
<form action="{% url 'blog:edit_action' %}" method="post">
    {% csrf_token %}
    {% if article %}
        <input type="hidden" name="article_id" value="{{ article.id }}">
        <label>
            文章标题
            <input type="text" name="title" value="{{ article.title }}"/>
        </label>
        <br>
        <label>
            文章内容
            <input type="text" name="content" value="{{ article.content }}"/>
        </label>
        <br>
    {% else %}
        <input type="hidden" name="article_id" value="0">
        <label>
        文章标题
        <input type="text" name="title"/>
        </label>
        <br>
        <label>
            文章内容
            <input type="text" name="content"/>
        </label>
        <br>
    {% endif %}
    <input type="submit">
</form>
</body>
</html>